package com.lt.crm.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lt.crm.pojo.SysRight;
import com.lt.crm.pojo.SysRole;
import com.lt.crm.service.SysRightService;
import com.lt.crm.mapper.SysRightMapper;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author Administrator
* @description 针对表【sys_right】的数据库操作Service实现
* @createDate 2024-06-18 16:58:48
*/
@Service
public class SysRightServiceImpl extends ServiceImpl<SysRightMapper, SysRight>
    implements SysRightService{

    @Resource
    SysRightMapper sysRightMapper;

    @Override
    public List<SysRight> findRightsByRole(SysRole sysRole) {
        return sysRightMapper.findRightsByRole(sysRole.getRoleId());
    }

    @Override
    public List<SysRight> findAllRights() {
        return this.list();
    }
}




